<?php
/**
 * @ClassName: Customer
 * @Description: TODO
 * @author: ynbjykj
 * @Date: 2025-11-29 9:40
 * @Version: V1.0.0
 */

namespace app\api\controller\agent;

use app\api\controller\Api;
use app\common\model;

class Customer extends Api
{
    /**
     * 客户列表
     * @return \think\response\Json
     */
    function getCustomerList()
    {
        $list = model\Customer::where('status', 1)->select();

        return json(['code' => 1, 'msg' => 'ok', 'data' => $list]);
    }

    /**
     * 客户详情
     * @return \think\response\Json
     */
    function detail()
    {
        $id = input('customer_id', 0);

        $data = model\Customer::get($id);

        return json(['code' => 1, 'msg' => 'ok', 'data' => $data]);
    }

}